home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / dvlprstc.hqx / Developer Stack 1.3r / card_37210.txt < prev    next >
Text File  |  1991-04-30  |  2KB  |  72 lines

  1. -- card: 37210 from stack: in.3r
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3837
  5. -- name: thePixel
  6.  
  7.  
  8. -- part 2 (button)
  9. -- low flags: 00
  10. -- high flags: A004
  11. -- rect: left=192 top=233 right=282 bottom=266
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 27056 / 27056
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Try me
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   if the optionkey is down then edit script of me
  23.   set cursor to 2
  24.   repeat until the mouseclick
  25.     put thePixel(the mouseh,the mousev)
  26.   end repeat
  27. end mouseUp
  28.  
  29.  
  30.  
  31. -- part contents for background part 5
  32. ----- text -----
  33. thePixel
  34.  
  35. -- part contents for background part 6
  36. ----- text -----
  37. thePixel is an XFCN which returns the value of one pixel on the screen.  The result is "black" if the pixel is on, and the result is "white" if the pixel is off.
  38.  
  39.  
  40. Note that the card and background layers are not taken into account as the screen itself is checked.
  41.  
  42. Use it in good health, and keep an eye out for more goodies!
  43.  
  44. Steve Maller
  45. 26 January 1988
  46. Apple Computer
  47.  
  48. AppleLink: MALLER
  49. CompuServe: 70436,1745
  50. Delphi: STEVEMALLER ΓÇó MCI Mail: SMALLER
  51.  
  52.  
  53.  
  54. -- part contents for background part 7
  55. ----- text -----
  56. Syntax:
  57.  
  58. thePixel(<h>,<v>)
  59.  
  60. h is the horizontal coordinate.
  61. v is the vertical coordinate.
  62.  
  63. Result:┬á┬á "black" or "white"
  64.  
  65.  
  66. -- part contents for background part 10
  67. ----- text -----
  68. 41
  69.  
  70. -- part contents for background part 27
  71. ----- text -----
  72. XFCN